package com.CST.service.cb;

import com.CST.bo.zx.ApprovalUserBO;
import com.CST.common.api.Response;
import com.CST.common.api.ResultObject;
import com.CST.dto.cb.PassWordDTO;
import com.CST.dto.cb.SysUserDTO;
import com.CST.entity.cb.BdSysUser;
import com.CST.entity.zx.ZxAuth;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * <p>
 * 用户管理 服务类
 * </p>
 * @author y
 * @since 2021-09-27
 */
public interface IBdSysUserService extends IService<BdSysUser> {


    /**
     * 新增用户
     *
     * @param bdSysUser
     * @return com.CST.common.api.Response
     *
     * @author y
     * @since 2021/09/27 09:32
     */
    Response insertSysUser(BdSysUser bdSysUser);

    /**
     * 修改密码
     * @param passWordDto
     * @author y
     * @since 2021/09/27 09:34
     * @return com.CST.common.api.ResultObject
     */
    ResultObject updateUserPassword(PassWordDTO passWordDto);
    ResultObject reStartPassword(String id);
    /**
     * <p>查询</p >
     * @param realName, userName
     * @author y
     * @since 2021/09/27 10:03
     * @return java.util.List<com.CST.entity.cb.BdSysUser>
     */
    List<BdSysUser> getUsers(String realName,String userName);
    List<BdSysUser> getUser(String userName);

//    /**
//     * <p>查询角色权限</p >
//     * @param userName
//     * @author y
//     * @since 2021/10/11 16:18
//     * @return java.util.List<com.CST.entity.cb.BdSysUser>
//     */
//    List<BdSysUser> getMenuByUserName(String userName);

    /**
     * <p>列表查询</p >
     * @param sysUserDto
     * @author y
     * @since 2021/10/09 10:35
     * @return com.github.pagehelper.PageInfo<com.CST.entity.cb.BdSysUser>
     */
    PageInfo<BdSysUser> getSysUserList(SysUserDTO sysUserDto);

    List<BdSysUser> getSelectUser(@Param("userNameList") List<String> userNameList);

    int updateSysUser(BdSysUser bdSysUser);

    BdSysUser getUserById(String leaderId);

    /**
     * 查询所有审批用户
     * @param approvalUserBO
     * @return
     */
    List<ZxAuth> getAllUser(ApprovalUserBO approvalUserBO);

    /**
     * 身份证后6位数加密
     * @return
     */
    Object updatePassword();
}
